#!/bin/bash
set -e

if [ -z "$1" ]; then
	echo 'mark_sam_qual0_start_end.sh <input.sam> <out.sam>'
	exit 1
fi

#-----------------------------------------------
#-----------------------------------------------
. /mnt/ilustre/app/medical/tools/.var #---------
#-----------------------------------------------
#-----------------------------------------------


# $samtools view -H $1 > header.sam 
# $samtools view $1 |awk '{print $11}' > qual.txt

# perl sub_start_end.pl

# basenam=`basename $1 .bam`
# sam=${basenam}.sam

# $samtools view -h $1 > $sam

perl ${tools_path}/script/mark_sam_qual0_start_end.pl $1 $2
